<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/8/9
  Time: 8:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <center>
        <h1>订单列表</h1>
        <h3>欢迎您 ${rub.truename}!</h3>
        <c:forEach var="ob" items="${olist}" varStatus="aa">
            <span>${aa.index+1}</span>
        <table border="1" rules="all">
            <tr>
                <td>商品名称</td>
                <td>${ob.pb.name}</td>
            </tr>
            <tr>
                <td>购买数量</td>
                <td>${ob.shuliang}</td>
            </tr>
            <tr>
                <td>订单总价</td>
                <td>${ob.total}</td>
            </tr>
            <tr>
                <td>创建时间</td>
                <td>    <f:formatDate value="${ob.created}" pattern="yyyy-MM-dd HH:mm:ss"></f:formatDate>
                        </td>
            </tr>
        </table>
        </c:forEach>
    </center>
</body>
<script>
    function changebuy(obj) {
        var aa = obj.value;
        var price =  document.getElementsByName("price")[0].value;
        document.getElementsByName("ob.order_total")[0].value = aa*price;
    }
</script>
</html>
